// JavaScript Document

function showPic( whichpic ) {
	var source = whichpic.getAttribute("href");
	var placeholder = document.getElementById("placeholder");
	placeholder.setAttribute("src", source );	
	
	// add text() to <p>
	var text = whichpic.getAttribute("title");
	var desc = document.getElementById("description");
	// alert(desc.nodeName);
	desc.firstChild.nodeValue = text;
	
}

function countBodyChildren(){
	var body_ele = document.getElementsByTagName("body")[0];
	// alert(body_ele.childNodes.length);	
	alert(body_ele.nodeType);
}

